package signature

import (
	"crypto/sha256"
	"fmt"
)

// 生成sign
func MakeSha256Sign(partnerCode string,curTime int64,nonceStr,credentialCode string) string {
	validStr := fmt.Sprintf("%s&%d&%s&%s", partnerCode, curTime, nonceStr, credentialCode)
	h := sha256.New()
    h.Write([]byte(validStr))
    bs := h.Sum(nil)
    result := fmt.Sprintf("%x", bs)
	return result
}
